/*
* // +-------------------------------------------------------------------------------------------------
* // |                 有你就好 [ 有节骨乃坚，无心品自端 ]     <http://encoding.wang>
* // +-------------------------------------------------------------------------------------------------
* // |                             独在异乡为异客         每逢佳节倍思亲
* // +-------------------------------------------------------------------------------------------------
* // |                 联系:   <707069100@qq.com>      <http://weibo.com/513778937>
* // +-------------------------------------------------------------------------------------------------
*/

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                   ErYang出品 属于小极品          共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------


package wang.encoding.mroot.common.mapper

import com.baomidou.mybatisplus.mapper.BaseMapper
import com.baomidou.mybatisplus.plugins.pagination.Pagination


/**
 * 基类 mapper
 *
 * @author ErYang
 */
interface SuperMapper<T> : BaseMapper<T> {

    /**
     * 得到所有  T 集合
     * @param page 分页
     * @param t  T
     * @return List< T> 集合
     */
    fun list2Page(page: Pagination, t: T): List<T>?

    // -------------------------------------------------------------------------------------------------

    /**
     * 得到所有  T 集合
     * @param t  T
     * @return List< T> 集合
     */
    fun listByT(t: T): List<T>?

    // -------------------------------------------------------------------------------------------------

    /**
     * 根根据 id 批量删除
     *
     * @param map 集合
     *
     * @return 集合
     */
    fun removeBatchById(map: Map<String, Any>): Int?

    // -------------------------------------------------------------------------------------------------

    /**
     * 根据 id 批量更新状态
     *
     * @param map 集合
     *
     * @return 集合
     */
    fun updateBatchStatusById(map: Map<String, Any>): Boolean

    // -------------------------------------------------------------------------------------------------

    /**
     * 得到最大 sort 值
     *
     * @return Int
     */
    fun getMax2Sort(): Int?

    // -------------------------------------------------------------------------------------------------

}

// -----------------------------------------------------------------------------------------------------

// End SuperMapper interface

/* End of file SuperMapper.kt */
/* Location: ./src/main/kotlin/wang/encoding/mroot/common/mapper/SuperMapper.kt */

// -----------------------------------------------------------------------------------------------------
// +----------------------------------------------------------------------------------------------------
// |                           ErYang出品 属于小极品  O(∩_∩)O~~   共同学习    共同进步
// +----------------------------------------------------------------------------------------------------
// -----------------------------------------------------------------------------------------------------
